//\file: Ray.h

#ifndef __ATOMTRACE_TRAX_RAY_H_
#define __ATOMTRACE_TRAX_RAY_H_

#include"Vector3.h"

namespace AtomTrace{
    class Ray
    {
    public:
        Vector3 _o;
        Vector3 _dir;

        Ray();
        Ray(const Vector3 & io, const Vector3 & idir);
        Ray(const Ray & rhs);

        inline void Normalize()
        {
            _dir.Normalize();
        }
        
        inline const Vector3 GetNormalize() const
        {
            return _dir.GetNormalize();
        }

        inline const float Length() const
        {
            return _dir.Length();
        }
        
        inline const float LengthSquare() const
        {
            return _dir.LengthSquare();
        }

        inline const Ray & operator=(const Ray &rhs)
        { _o = rhs._o; _dir = rhs._dir; return *this; }
    };

} // namespace AtomTrace

#endif //__ATOMTRACE_TRAX_RAY_H_
